<?php
class Form_Rates extends Zend_Form
{
    public function __construct($options=array())
    {
		parent::__construct($options);
		Zend_Loader::loadClass('Hotel', array('../application/admin/models/'));
		$this->setMethod('post');
		$mod_hotel = new Hotel();
		$hotel_arr = $mod_hotel->listHotels();
		
		$this->addPrefixPath('Lion_Form_Element', '../library/Form/Element/', 'element');
		
		 
		
		$rate_cat = $this->addElement('text', 'rate_category', array(
            'label'      => '  Category:',
            'filters'    => array('StringTrim'),
            'class'			 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 100))
            )
        ));
        
        $rate_basis = $this->addElement('text', 'rate_basis', array(
            'label'      => '  Basis:',
            'filters'    => array('StringTrim'),
            'class'			 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 100))
            )
        ));
        
        $startdate = $this->addElement('text', 'fromdate', array(
            'label'      => 'From Date:',
            'filters'    => array('StringTrim'),
            'class'			 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 100))
            )
        ));
        
        $enddate = $this->addElement('text', 'todate', array(
            'label'      => 'To date:',
            'filters'    => array('StringTrim'),
            'class'			 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 100))
            )
        ));
        
        
        $rates_content = $this ->addElement('formRTE', 'rate_additionalinfo',
    				array('label' =>'Rates Additional Info:',
    					'validators' =>array(
    					array('validator' =>'StringLength', 'options' =>array(0, 1000))
    				),
		));
		


        	   	$this->addElement('hidden', 'hotel_id', array(
        	            'filters'  => array('int'),
        	            'class'	   => 'hidden',
        	            'value'    => $options['hotel_id'],
        	    ));
                        if($options['action']=="edit"){

                            $this->addElement('hidden', 'rate_id', array(
        	            'filters'  => array('int'),
        	            'class'	   => 'hidden',
        	            'value'    => $options['rate_id'],
        	    ));

                        }

		 
		//$this->addElement('submit', $btn_label);
    }
}
